
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>表格</title>
    <link rel="stylesheet" href="__PUBLIC__/layui/css/layui.css">
    <link rel="stylesheet" href="__PUBLIC__/static/css/style.css">
    <link rel="icon" href="__PUBLIC__/static/image/code.png">
</head>
<body class="body">



<div class="tab-top">
  <a class="layui-btn site-demo-active layui-btn-sm" data-type="tabAdd" href="{:url('add')}"><i class="layui-icon">&#xe608;</i>添加数据</a>

<div class="search">
  <form class="layui-form" action="">
  <div class="layui-inline">
    <input class="layui-input layui-input-sm" name="search" placeholder="请输入文章标题" id="search-elm" autocomplete="off" value="{$search}">
  </div>
  <button class="layui-btn site-demo-active layui-btn-sm search-btn" data-type="reload">搜索</button>
</form>
</div>

</div>


<div class="layui-form">
  <table class="layui-table" lay-filter="parse-table-demo" id="test33" style="display:none">
    <thead>
      <tr>
        <th lay-data="{type:'checkbox'}"></th>
        <th lay-data="{field:'id', width:80, sort: true}">ID</th>
        <th lay-data="{field:'title', minwidth:300}">标题</th>
        <th lay-data="{field:'typename', width:180,}">栏目</th>
        <th lay-data="{field:'click', width:100}">点击</th>
        <th lay-data="{field:'write', width:150}">作者</th>
        <th lay-data="{field:'update_time', width:150}">时间</th>
      </tr> 
    </thead>
    <tbody>
{foreach $list as $key=>$vo } 
      <tr>
        <td></td>
        <td>{$vo.id}</td>
        <td><a href="{:url('show',['id'=>$vo.id])}">{$vo.title} </a>{notempty name="$vo.article_img"} <span class="layui-badge layui-bg-green"><i class="layui-icon">&#xe64a;</i></span>{/notempty}</td>
        <td>{$vo->arctype->title}</td>
        <td>{$vo.click}</td>
        <td>{$vo.write}</td>
        <td>{$vo.update_time|date='Y-m-d H:i'}</td>
      </tr>
{/foreach}
    </tbody>
  </table>


</div>


{$page|raw}

<script type="text/javascript" src="__PUBLIC__/layui/layui.js"></script>
<script src="__ADMIN__/js/comm.js" charset="utf-8"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script>
layui.use(['form','table'], function(){
  var $ = layui.jquery
      ,form = layui.form
      ,table = layui.table;
  
      table.init('parse-table-demo', { //转化静态表格
        //height: 'full-500'
      }); 

});

</script>
</body>
</html>